<template>
  <div class="container">
    <div class="methods" @click="testNavi">
      发起会话123
    </div>
    <i-cell title="发起会话" is-link url="/pages/search/main?type=user"></i-cell>
  </div>
</template>

<script>
  import {
    mapState,
    mapGetters
  } from 'vuex'
  export default {
    data() {
      return {
        scrollTop: 0,
      }
    },
    computed: {
      ...mapState({
        currentPage: state => state.global.currentPage,
      }),
      ...mapGetters(['myInfo'])
    },
    onPageScroll(event) {
      this.scrollTop = event.scrollTop
    },
    methods: {
      testNavi() {
        console.warn('testNavi')
        wx.navigateTo({
          url: '/pages/search/main?type=user'
        })
      },
      // 点击登录进行初始化
      handleLogin() {
        console.warn('myInfo', this.myInfo)
      },

    },
    created() {
      console.warn('--------approve=created------')
    },
    onLoad() {
      this.handleLogin()
    },
    onShow() {
      console.warn('contact=onShow')
      wx.showTabBar()
    },
    mounted() {}
  }
</script>

<style lang='stylus'>
  page {
    height: 100%;
  }

  .container {
    background: #F3F6F9;
    width: 100%;
    height: 100%;
  }

  .input-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
  }

  .input {
    color: $regular;
    text-align: left;
    height: 32px;
    background-color: white;
    font-size: 16px;
    line-height: 32px;
    width: 75%;
    border-radius: 10px;
  }

  .friends {
    height: 100vh;
    background-color: $white;

    .van-index-anchor {
      background-color: #ededed;
    }

    .van-index-anchor--active {
      color: $primary;
    }

    .friend-item {
      display: flex;
      padding: 12px 0 12px 12px;
    }

    .avatar {
      width: 40px;
      height: 40px;
      margin-right: 12px;
    }

    .username {
      width: 100%;
      height: 50px;
      line-height: 40px;
      font-size: 18px;
      border-bottom: 1px solid #F3F6F9;
    }
  }
</style>
